const userKey = "user";

export function exists() {
  return sessionStorage.getItem(userKey) != null;
}

export function getUser() {
  return JSON.parse(sessionStorage.getItem(userKey));
}

export function save(user) {
  sessionStorage.setItem(userKey, JSON.stringify(user))
}
export  function removeUser() {
  sessionStorage.removeItem(userKey);

}
